package com.zyg.common;

/**
 * 自定义的返回值
 */
public enum ResultCode {
    //成功
    SUCCESS(0, "成功"),

    //登录模块错误
    LOGIN_USER_ERROR(10001,"用户账号或密码错误！"),
    LOGIN_DISABLE_USER_ERROR(10002,"用户账号已被禁用！"),

    //权限校验
    INVALID_TOKEN(40003,"Access-token 无效"),

    //文件校验
    FILE_UPLOAD_ERR(50001,"文件上传失败！"),
    FILE_UPLOAD_ERR_IS_NULL(50002,"文件上传失败！传入的文件为空！"),

    //错误
    ERROR(99999,"错误");

    private Integer code;
    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
